package com.zuoent.silver

import WeixinClient
import android.os.Bundle
import io.flutter.app.FlutterActivity
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity() : FlutterActivity() {
    private val weixinChannel = "silver.zuoent.com/weixin"

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        GeneratedPluginRegistrant.registerWith(this)

        MethodChannel(flutterView, weixinChannel).setMethodCallHandler { call, result ->
            WeixinClient.getInstance(this.application).requestLogin(result)
        }
    }
}
